<template>
  <div>
    <!-- 路由出口 -->
    <keep-alive include="searchResults">
      <router-view></router-view>
    </keep-alive>

    <!-- 导航栏 -->
    <van-tabbar
      v-model="active"
      route
      v-if="$route.meta.showTab"
      placeholder
      fixed
    >
      <van-tabbar-item to="/home" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item to="/qa" icon="chat-o">问答</van-tabbar-item>
      <van-tabbar-item to="/movie" icon="video-o">音频</van-tabbar-item>
      <van-tabbar-item to="/user" icon="user-o">用户</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 0
    };
  }
};
</script>

<style></style>
